﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Database;

namespace Business
{
    public class QuanLyDangNhap
    {
        TrungTamEntities TrungTam;
        public QuanLyDangNhap(){
            TrungTam = new TrungTamEntities();
        }
        public bool kiemtradangnhap(string taikhoan,string matkhau)
        {
            try
            {
                var ngdung = (from p in TrungTam.NguoiDungs
                              where p.TaiKhoan.Equals(taikhoan)
                                && p.MatKhau.Equals(matkhau)
                              select p).First();
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
    }
}
